/*

Author:Vishwajeet Dusane
*/

#include<stdio.h>
#include<math.h>
#include<iostream.h>

class Maths
{
public:
 int sign,n;
 Maths()
 { //cout.precision(9);
      
  sign=-1; 
 
 } 
 int invertSign(int sign)
 {
   if(sign==1)
    return -1;
   else
    //cout.precision(9);
     return 1;
    
   
 }
 long double getPower(float x,int n)
 {
  return pow(x,n);  
 }     
 
 long double getFact(int n)
 {
   long double fact;
   fact=1;
   
   for(int i=1;i<=n;i++)
    {
      fact=fact*i;
    } 
   return fact;
 }
};

class Expo:public Maths
{
 public //cout.precision(9);
      :
 long double series;
  

	void  expoPowerSeries(float x)

	
	{
	   //x power / factorial
	   long double fact;
	   series=1+x;
	   n=2; 
	   sign=-1;
	    
	    for(int i=0;i<50;i++)
	    {   Expo E;
	       fact=getFact(n); 
	   //    sign=invertSign(sign);  
	        
	       series=series+((getPower(x,n)/fact));
	      
	       n=n+1;  
	     } 
	 cout<<"\nPower series :"<<series;     
	}


	 
};



int main()
{
Expo E;
int choice;

      for(int i=0;i<20;i++)
      {
	E.expoPowerSeries(i);
	cout<<"Actual value:Of expo \n"<<exp(i);
      }	
	    
 
 

   

 return 0;
}
